package service;

import java.util.List;

import models.Attachment;
/**
 * AttachmentService 
 * @author ichinacn
 *
 */
public class AttachmentService {
	
	/**
	 * 
	 * @return
	 */
	public static List<Attachment> findAll(){
		return Attachment.findAll();
	}
	
	/**
	 * 
	 * @param id
	 * @return
	 */
	public static Attachment findById(long id){
		return Attachment.findById(id);
	}
	
	/**
	 * 
	 * @param att
	 */
	public static void create(Attachment att){
		att.create();
	}
	
	/**
	 * 
	 * @param att
	 */
	public static void save(Attachment att){
		att.save();
		}
	
	/**
	 * 
	 * @param id
	 */
	public static void delete(long id){
		Attachment.findById(id)._delete();
	}
}
